<?php
if (!empty($de[0])) {
    $_SESSION['shorturl'] = $de[0];
}
?>
<?php
$path = S_ROOT . '/company/';
if (!empty($de[0])) {
    $last_word = $de[0];
} else {
    if (!empty($_SESSION['username'])) {
        // personal page seller
        $strin = "";
        $st = $_SESSION['acc_id'];
        $company = new company();
        $company->getcompany($strin, $st);
        $last_word = $company->shorturl;
        // end personal page seller
    }
}
if (!empty($last_word)) {
    $cat_id = mysql_query("SELECT * FROM tbluser AS iduser
    INNER JOIN tblpharmacy AS com ON iduser.`id`=com.`user_id`
    WHERE com.`shorturl`='$last_word'");
    $cat_id_get = mysql_fetch_assoc($cat_id);
    $seller_cat = $cat_id_get['cat_id'];
    $seller_id = $cat_id_get['id'];
}

//for admin of seller
if (empty($de[0])) {
    if (empty($_SESSION['username'])) {
        //header('Location: '.W_ROOT.'/login.php?message=Your account had sign out, please sign in again!&return_url='.$CURRENT_URL); 
    }
}
//end for admin of seller   
?>
<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title><?php echo $site_title; ?> - <?php echo $lang['PAGE_TITLE']; ?></title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta name="description" content="<?php echo $site_description; ?>" />
        <meta name="keywords" content="<?php echo $site_keywords; ?>" />
        <base href="<?php echo base_url; ?>" />
        <link rel="stylesheet" href="<?php echo base_url; ?>templates/stylesheet/bootstrap.css" />
        <link rel="stylesheet" href="<?php echo base_url; ?>templates/stylesheet/stylesheet.css" />
        <link rel="stylesheet" href="<?php echo base_url; ?>templates/stylesheet/bootstrap-responsive.min.css" />
        <link rel="stylesheet" href="<?php echo base_url; ?>templates/stylesheet/theme-responsive.css" />
        <link rel="stylesheet" href="<?php echo base_url; ?>templates/stylesheets/app.css" />
        <link href='http://fonts.googleapis.com/css?family=Hanuman' rel='stylesheet' type='text/css'/> 
        <script src="<?php echo base_url; ?>templates/javascripts/jquery-1.7.1.min.js"></script>

        <link rel="stylesheet" href="<?php echo base_url; ?>feature/coin-slider/coin-slider-styles.css" type="text/css" />
        <script src="<?php echo base_url; ?>templates/javascripts/bootstrap-alert.js"></script>
        <link media="screen" rel="stylesheet" href="<?php echo W_ROOT; ?>/social/login/widget/css/colorbox.css" />
        <script src="<?php echo base_url; ?>social/login/widget/js/jquery.colorbox.js"></script> 

        <style type="text/css">
<?php
include(S_ROOT . "/company/styles/style.php");
?>
        </style>
        <script>
            $(document).ready(function() {
                $(".widget_link").colorbox({iframe: true, innerWidth: 430, innerHeight: 222});
                $(".cart_popup").colorbox();
            });
        </script>


        <?php
        if (isset($include)) {
            echo $include;
        }
        /* Add Javascript and CSS files */


//get uer
        if (!empty($last_word)) {
            $user_id = mysql_query("SELECT * FROM tblpharmacy AS com INNER JOIN tbluser AS iduser ON com.user_id=iduser.`id` WHERE com.shorturl='" . $last_word . "'");
            $user_ck = mysql_fetch_assoc($user_id);
        } else if (!empty($_SESSION['username'])) {
            $user_id = mysql_query("SELECT * FROM tblpharmacy AS com INNER JOIN tbluser AS iduser ON com.email=iduser.email WHERE com.email='" . $_SESSION['username'] . "'");
            $user_ck = mysql_fetch_assoc($user_id);
        } else {
            //header('location:../index.php');
        }
        ?>
        <script language="JavaScript">
            function disableEnterKey(e)
            {
                var key;
                if (window.event)
                    key = window.event.keyCode; //IE
                else
                    key = e.which; //firefox     

                return (key != 13);
            }

        </script>        
        <!-- IE Fix for HTML5 Tags -->
        <!--[if lt IE 9]>
          <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
    </head>